{"componentChunkName":"component---node-modules-rocketseat-gatsby-theme-docs-core-src-templates-docs-query-js","path":"/manual-review/PropWrappedAssetsFeeCollectorFacet-PWA","result":{"data":{"mdx":{"id":"c34e73d8-47c6-536f-8fb1-b8c630af6fa5","excerpt":"PWA-01M: Invalid Function Requirement Documentation Type Severity Location Logical Fault PropWrappedAssetsFeeCollectorFacet.sol:L56 Description: The referenced…","fields":{"slug":"/manual-review/PropWrappedAssetsFeeCollectorFacet-PWA/"},"frontmatter":{"title":"PropWrappedAssetsFeeCollectorFacet Manual Review Findings","description":"Contains all the findings that relate to manual review on the contract codebase","image":null,"disableTableOfContents":null},"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"PropWrappedAssetsFeeCollectorFacet Manual Review Findings\",\n  \"description\": \"Contains all the findings that relate to manual review on the contract codebase\"\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h2\", {\n    \"id\": \"span-idpwa-01mpwa-01m-invalid-function-requirement-documentationspan\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#span-idpwa-01mpwa-01m-invalid-function-requirement-documentationspan\",\n    \"aria-label\": \"span idpwa 01mpwa 01m invalid function requirement documentationspan permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), mdx(\"span\", {\n    id: \"PWA-01M\"\n  }, \"PWA-01M: Invalid Function Requirement Documentation\")), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Severity\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Location\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"/reports/nexera-core-tokenization-system-update-6810dab7860d510018e9c07c/appendix/finding-types#logical-fault\"\n  }, \"Logical Fault\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"img\", {\n    parentName: \"td\",\n    \"className\": \"o-severity o-informational\",\n    \"src\": \"https://omniscia.io/report-assets/informational.png\"\n  })), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/evergonlabs/TMI-tokenizer/blob/2695e5b65e872ec0df628769047e38d21ee14bb0/packages/contracts/contracts/privateFacets/preFractionsFacets/PropWrappedAssetsFeeCollectorFacet.sol#L56\"\n  }, \"PropWrappedAssetsFeeCollectorFacet.sol:L56\"))))), mdx(\"h3\", {\n    \"id\": \"description\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#description\",\n    \"aria-label\": \"description permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Description:\"), mdx(\"p\", null, \"The referenced function requirement that is documented is not actually enforced by the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/evergonlabs/TMI-tokenizer/blob/2695e5b65e872ec0df628769047e38d21ee14bb0/packages/contracts/contracts/privateFacets/preFractionsFacets/PropWrappedAssetsFeeCollectorFacetStorage.sol#L88-L108\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"PropWrappedAssetsFeeCollectorFacetStorage::initWrappedAssetsFeeCollectorFacet\")), \" function.\"), mdx(\"h3\", {\n    \"id\": \"example\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#example\",\n    \"aria-label\": \"example permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Example:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-sol\",\n    \"metastring\": \"title=packages/contracts/contracts/privateFacets/preFractionsFacets/PropWrappedAssetsFeeCollectorFacet.sol highlight={10,27} lineNumbers=true lineOffset=46\",\n    \"title\": \"packages/contracts/contracts/privateFacets/preFractionsFacets/PropWrappedAssetsFeeCollectorFacet.sol\",\n    \"highlight\": \"{10,27}\",\n    \"lineNumbers\": \"true\",\n    \"lineOffset\": \"46\"\n  }, \"/**\\n * @notice Initializes the `PropWrappedAssetsFeeCollectorFacetStorage` by registering the eligible fee collector and the fee rate\\n * to be applied to campaigns' wrapped assets.\\n *\\n * @dev For example, if the `feeRate` is set to 10%, then a campaign wrapping 100 ERC20 $token will result in 10 $token\\n * being transferred to the `feeCollector` when the campaign is created.\\n *\\n * IMPORTANT:\\n *  - Rates and percentages are represented with a base of 10^6 (e.g., 0.1 -> 10% is `100000`).\\n *  - `feeCollector` cannot be set to the zero address.\\n *\\n * Emits a {PreFractionFeeSchemaInitialized} event.\\n *\\n * This function can only be called by the Admin (see `AccessControlFacet.sol`).\\n *\\n * @param initWrappedAssetsFeeCollectorData ABI-encoded data containing:\\n *  - `feeCollector`: The eligible address that will be receiving the fees (if any).\\n *  - `feeRate`: The rate defining what portion of a campaign\\u2019s wrapped assets is charged as a fee.\\n */\\nfunction initWrappedAssetsFeeCollectorFacet(bytes calldata initWrappedAssetsFeeCollectorData) external onlyExternalDelegateCall {\\n    address account = ERC2771RecipientStorage.layout()._msgSender();\\n    if (!AccessControlFacetStorage.layout().hasRole(AccessControlFacetStorage.ADMIN_ROLE, account))\\n        revert UnauthorizedInitialization(account);\\n\\n    (address feeCollector_, uint256 feeProportion_) = PropWrappedAssetsFeeCollectorFacetStorage\\n        .layout()\\n        .initWrappedAssetsFeeCollectorFacet(initWrappedAssetsFeeCollectorData);\\n\\n    emit PreFractionFeeSchemaInitialized(feeCollector_, feeProportion_);\\n}\\n\")), mdx(\"h3\", {\n    \"id\": \"recommendation\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#recommendation\",\n    \"aria-label\": \"recommendation permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Recommendation:\"), mdx(\"p\", null, \"We advise either the documentation or the code to be updated, either of which we consider acceptable.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-d682057ecb0e254069773d64f32c068cedb71e2a\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-d682057ecb0e254069773d64f32c068cedb71e2a\",\n    \"aria-label\": \"alleviation d682057ecb0e254069773d64f32c068cedb71e2a permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (d682057ecb0e254069773d64f32c068cedb71e2a):\"), mdx(\"p\", null, \"The documentation of the function has been corrected to match its implementation, addressing this exhibit.\"), mdx(ViewDiffButton, {\n    repoUrl: \"https://github.com/evergonlabs/TMI-tokenizer\",\n    mainHash: \"2695e5b65e872ec0df628769047e38d21ee14bb0\",\n    fixHash: \"d682057ecb0e254069773d64f32c068cedb71e2a\",\n    gitHubIssue: \"344\",\n    mdxType: \"ViewDiffButton\"\n  }));\n}\n;\nMDXContent.isMDXComponent = true;","headings":[{"depth":2,"value":"<span id=\"PWA-01M\">PWA-01M: Invalid Function Requirement Documentation</span>"},{"depth":3,"value":"Description:"},{"depth":3,"value":"Example:"},{"depth":3,"value":"Recommendation:"},{"depth":3,"value":"Alleviation (d682057ecb0e254069773d64f32c068cedb71e2a):"}]}},"pageContext":{"slug":"/manual-review/PropWrappedAssetsFeeCollectorFacet-PWA/","prev":{"label":"PropPacketsGatheredFeeCollectorFacetStorage.sol (PPC-M)","link":"/manual-review/PropPacketsGatheredFeeCollectorFacetStorage-PPC"},"next":{"label":"PropWrappedAssetsFeeCollectorFacetStorage.sol (PWF-M)","link":"/manual-review/PropWrappedAssetsFeeCollectorFacetStorage-PWF"}}},"staticQueryHashes":["1954253342","2328931024","2501019404","973074209"]}